import request from '@/utils/request'
import downloadService from "@/utils/downloadService";

// 查询评论列表
export function listComment(query) {
  return request({
    url: '/content/comment/list',
    method: 'get',
    params: query
  })
}

// 删除友链
export function delComment(id) {
  return request({
    url: '/content/comment/' + id,
    method: 'delete'
  })
}

// 审核评论
export function changeCommentStatus(id, statusList, newStatus) {
  return request({
    url: '/content/comment/changeCommentStatus',
    method: 'put',
    data: {
      ids: id,
      statusList: statusList,
      newStatus: newStatus
    }
  })
}

// 导出评论
export function exportComment() {
  return downloadService({
    url: '/content/comment/export',
    method: 'get'
  })
}
